<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Person(name, age, sex) {
            this.name = name;
            this.age = age;
            this.sex = sex;
        }

        function Student(name, age, sex, tel, grade) {
            //与call方法的区别传参列表不同,第二位传入的是数组
            Person.apply(this, [name, age, sex]);
            this.tel = tel;
            this.grade = grade;
        }
        var student = new Student("wswj", 123, "male", 139, 2017);
    </script>
</body>

</html>